enum states{
OFF,
PARKLAMPS,
HEADLAMPS,
AUTO,
RESET
} re_states;

 enum states2{
LIGHTSOFF,
HALFLIGHT,
LIGHTSON
} re_states2;

#pragma config FOSC = INTOSCIO_EC //Internal oscillator, port function on RA6, EC used by USB 
#pragma config WDT = OFF //Disable watchdog timer

#define PERC40 102
#define PERC60 153
#define PERC80 204
#define GET_INPUT PORTB&0X03
#define OUT_PORT LATD
#define TURN_PARKLAMPS 3
#define TURN_OFF 0
#define TURN_HEADLAMPS 12
#define TURN_ALLLAMPS 15
#define GET_ADC_INFO ADCON0bits.GO_DONE = 1;while(ADCON0bits.GO_DONE );
#define RESET_WARNING 9
#define ADC_RESULT ADRESH